1. Field of the Invention
The present invention relates to apparatus and methods for dynamically scaling audio processing tasks from a default processor to one or more additional processors which may be of a different type.
2. Description of the Prior Art
Many applications for personal computers require audio processing either for music synthesis or audio effects such as artificial reverberation and 3D localization. Audio is used for musical education, background for advertising, sound effects and musical accompaniment for computer games, and entertainment. Music synthesis offers advantages over the playback of prerecorded music. It is easier to modify the musical accompaniment in response to actions of the listener, for example by changing the tempo or the orchestration as the intensity of game play increases. Also, the control parameters for the synthesizer require a much lower bandwidth than streams of digitized audio samples. Similarly, adding audio effects during playback makes it easier to modify the effect in response to actions of the listener, for example by changing the apparent position of a sound in response to joystick manipulations.
The most common method for controlling music synthesis in a multimedia system is via MIDI (Musical Instrument Digital Interface) commands. MIDI represents music as a series of events, such as "note on," "note off," and "volume." MIDI organizes the synthesis process into sixteen logical channels, where each channel is assigned a particular "patch" (musical timbre). The stream of MIDI events is normally produced by an application such as a music sequencing program or game, but it can also be provided by an external controller such as a music keyboard. The music synthesizer responds to the MIDI stream to create the desired audio output. Synthesizers are normally able to synthesize some number of voices (often 32) at the same time. The MIDI standard permits these voices to have up to 16 different timbres.
The most common way to control audio effects processing is through Application Program Interfaces (APIs) provided as part of the operating system running on the PC (e.g., Microsoft Windows 95). For example, the DirectSound3D API controls an audio effect that makes it seem as if a sound is emanating from any location surrounding the listener. Audio effects processors are normally able to process some number of audio streams at the same time (often 8 for 3D positioning).
Audio processing in personal computers is accomplished either using hardware accelerator chips (supplied on add-on cards or on the mother board) or using the host CPU. Hardware accelerator chips can be based on fixed-function hardware designed specifically for audio processing or general-purpose digital signal processors that are programmed for audio processing. Hardware accelerators increase cost, particularly when they are designed to support worst-case signal processing requirements.
Using the host processor has the advantage of reducing cost and hardware complexity, but distracting the host processor with audio processing tasks slows the operation of a current application such as a game.
The computational requirements for audio processing often vary depending on the requirements of the application. For example, the number of voices of music synthesis required can vary from a few to 32, 64, or more. Similarly, the number of streams of 3D positioning can vary from 1 or 2 to 8, 16, or more. The current practice for implementing algorithms on hardware accelerators or the host CPU is to place an a priori limit on the number of signal processing tasks the algorithm will perform. Such a limit is required in a hardware accelerator to determine the hardware resources that need to be provided. In a host-based implementation, the limit is required to assure that some computational resources remain for the CPU to run the application, the operating system, and any other tasks it may be required to perform concurrently. Once a processor reaches its limit, the processor either ignores requests to perform additional tasks or it finds a way to shed tasks already running to make way for the new request.
A need remains in the art for apparatus and methods which allow music synthesis and audio effects processing to dynamically scale from a default processor to one or more additional processors which may not be of the same type--for example from a DSP to the host CPU--in a manner which permits the audio system to support more tasks as the need arises.